﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;

namespace Portfel.ViewModels
{
   public class AktywaViewModel : ViewModelBase
    {
 
        private Uri imageThumbnailSource;
        private string title;
        private string information;
        private string group;
       private string kurs;
       private string zmiana;
       private string zmianaProcent;
       private Brush color;
       private string _koszt;
       private string _wartość;
       private string _ilość;
       private string max;
       private bool iseditable;

       public bool IsEditable
       {
           get
           {
               return this.iseditable;
           }
           set
           {
               if (this.iseditable != value)
               {
                   this.iseditable = value;
                   this.OnPropertyChanged("IsEditable");
               }
           }
       }
       public Brush Color
       {
           get
           {
               return this.color;
           }
           set
           {
               if (this.color != value)
               {
                   this.color = value;
                   this.OnPropertyChanged("Color");
               }
           }
       }

       public string Koszt
       {
           get
           {
               return this._koszt;
           }
           set
           {
               if (this._koszt != value)
               {
                   this._koszt = value;
                   this.OnPropertyChanged("Koszt");
               }
           }
       }

       public string Wartość
       {
           get
           {
               return this._wartość;
           }
           set
           {
               if (this._wartość != value)
               {
                   this._wartość = value;
                   this.OnPropertyChanged("Wartość");
               }
           }
       }

       public string Ilość
       {
           get
           {
               return this._ilość;
           }
           set
           {
               if (this._ilość != value)
               {
                   this._ilość = value;
                   this.OnPropertyChanged("Ilość");
               }
           }
       }

       public string Max
       {
           get
           {
               return this.max;
           }
           set
           {
               if (this.max != value)
               {
                   this.max = value;
                   this.OnPropertyChanged("Max");
               }
           }
       }
        /// <summary>
        /// Gets or sets the image thumbnail source.
        /// </summary>
        public Uri ImageThumbnailSource
        {
            get
            {
                return this.imageThumbnailSource;
            }
            set
            {
                if (this.imageThumbnailSource != value)
                {
                    this.imageThumbnailSource = value;
                    this.OnPropertyChanged("ImageThumbnailSource");
                }
            }
        }

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        public string Title
        {
            get
            {
                return this.title;
            }
            set
            {
                if (this.title != value)
                {
                    this.title = value;
                    this.OnPropertyChanged("Title");
                }
            }
        }

        /// <summary>
        /// Gets or sets the information.
        /// </summary>
        public string Information
        {
            get
            {
                return this.information;
            }
            set
            {
                if (this.information != value)
                {
                    this.information = value;
                    this.OnPropertyChanged("Information");
                }
            }
        }


        public string Kurs
        {
            get { return this.kurs; }
            set
            {
                if (this.kurs != value)
                {
                    this.kurs = value;
                    this.OnPropertyChanged("Kurs");
                }
            }
        }

        public string ZmianaProcent
        {
            get { return this.zmianaProcent; }
            set
            {
                if (this.zmianaProcent != value)
                {
                    this.zmianaProcent = value;
                    this.OnPropertyChanged("ZmianaProcent");
                }
            }
        }

        public string Zmiana
        {
            get { return this.zmiana; }
            set
            {
                if (this.zmiana != value)
                {
                    this.zmiana = value;
                    this.OnPropertyChanged("Zmiana");
                }
            }
        }
        /// <summary>
        /// Gets or sets the group.
        /// </summary>
        public string Group
        {
            get
            {
                return this.group;
            }
            set
            {
                if (this.group != value)
                {
                    this.group = value;
                    this.OnPropertyChanged("Group");
                }
            }
        }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return this.title;
        }

		/// <summary> 
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. 
        /// </summary> 
        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> 
        /// <returns> 
        ///   <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.  

        /// </returns> 
        public override bool Equals(object obj) 
        { 
            var typedObject = obj as AktywaViewModel; 
            if (typedObject == null) 
            { 
                return false; 
            } 
            return this.Title == typedObject.Title && this.Information == typedObject.Information; 
        }

		/// <summary> 
        /// Returns a hash code for this instance. 
        /// </summary> 
        /// <returns> 
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.   

        /// </returns> 
        public override int GetHashCode() 
        { 
            return this.Title.GetHashCode() ^ this.Information.GetHashCode(); 
        }
    }
}
